<!--

    This file is part of kanji-portal.com.

    kanji-portal.com is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    kanji-portal.com is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with kanji-portal.com.  If not, see <http://www.gnu.org/licenses/>.

    Copyright (c) 2008-2009 Nicolas Radde <nicolas@radde.org>

-->
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:a="http://richfaces.org/a4j"
                xmlns:s="http://jboss.com/products/seam/taglib"
                template="#{theme.template}">

    <!-- content -->
    <ui:define name="content">
        <fieldset id="LoginFieldSet">
            <legend>#{messages['login.text.connection']}</legend>
            <h:form id="login">
                <a:outputPanel id="loginPanel">
                    <div class="section">
                        <label>#{messages['login.label.username']}</label>
                        <h:inputText id="username" value="#{identity.username}"/>

                        <div class="errors"><h:message for="username"/></div>

                        <label>#{messages['login.label.password']}</label>
                        <h:inputSecret id="password" value="#{identity.password}"/>


                        <div class="errors"><h:messages globalOnly="true"/></div>
                        <div class="entry">
                            <a:commandButton id="login" action="#{identity.login}"
                                             value="#{messages['login.acb.login']}"
                                             reRender="loginPanel"/>
                            <a:status>
                                <f:facet name="start">
                                    <h:graphicImage value="#{theme.spinner}"/>
                                </f:facet>
                            </a:status>
                        </div>
                    </div>
                </a:outputPanel>
            </h:form>
        </fieldset>
    </ui:define>

</ui:composition>
